#include <stdio.h>
#include <opencv2/opencv.hpp>
#include <fstream>
#include <iostream>
#include <armadillo>
#include <iomanip>
#include <vector>

using namespace std;
using namespace arma;

#include "optflow_feat_def.hpp"
#include "optflow_feat_impl.hpp"





uword ro = 120;
uword co = 160;
//Optical Flow features
//Knn classifier: N=3

//NICTA
const std::string path = "/home/johanna/codes/multi-actions/kth_testing/"; 

//Home
//const std::string path = "/home/johanna/codes-svn/multi-action/kth_testing/";


//UQ-server
//const std::string path = "/home/users/uqjcarva/Johanna/codes-linux/multi-actions/kth_testing/"; 


//wanda
//const std::string path = "/data2/Users/johanna/codes-wanda/kth_testing/";


//UQ
//const std::string path = "/home/johanna-uq/codes-svn/single-action/kth_testing/";

///Create this folder
////When I need to save
const std::string  feat_path ="./flow_features/"; //Create this folder


const std::string  actionNames = "actionNames.txt";



int
main(int argc, char** argv)
{
  
  //Seria bueno precalcular todas las caracteristicas primero??
  // Tal vez no porque el set up para KTH dataset es especifico no cross-validation
  //Pensar que es mejor.
  
  opt_feat kth_optflow(path, actionNames, feat_path, co, ro);
  cout << "Training with 15 features: " << endl;
  kth_optflow.training(); 
  cout << endl;
  
  
  cout << "Testing" << endl;
  kth_optflow.testing();
  
  //cout << "Nearest neighbour using Riemannian Metric " << endl;
  //kth_optflow.nn_riemannian(); //Using a covariance descriptor per video
  
  //kth_optflow.nn_riemannian_may_rule(); // Multiple Covariance despcriptors per video
  
  
  
}
